<template>
  <p>Sum is: {{ sum }}</p>
  <button @click="increment">increment</button>
</template>

<script lang="ts">
  import { defineComponent, ref } from 'vue';

  export default defineComponent({
    name: 'ClickEvent',
    setup: () => {
      const sum = ref(0);

      const increment = () => {
        sum.value += 1;
      };

      return {
        sum,
        increment
      };
    }
  });
</script>

<style scoped></style>
